package com.xjust.service.impl;

import com.xjust.Mapper.DeptmentMapper;
import com.xjust.service.EmployeeService;
import com.xjust.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserLoginServiceImpl implements UserLoginService {
    @Autowired
   private EmployeeService employeeService;
    @Autowired
    private DeptmentMapper deptmentMapper;
    @Override
    public String login(Integer id, String password) {
        //获取部门id
       Integer deptId = employeeService.getDepartmentId(id,password);
       //根据部门id获取部门类型
        String type =  deptmentMapper.getDepartmentType(deptId);
        return type;
    }
}
